<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
    <title>Luat开源项目脚本lib</title>
    <link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->


<div id="main">


<!-- Menu -->

<div id="navigation">
<br/>
<h1>script_LuaTask lib</h1>

<ul>
  <li><a href="../index.html">Index</a></li>
</ul>

<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>


<h2>Modules</h2>
<ul class="nowrap">
  <li><a href="../modules/aLiYun.html">aLiYun</a></li>
  <li><a href="../modules/aLiYunOta.html">aLiYunOta</a></li>
  <li><a href="../modules/agps.html">agps</a></li>
  <li><a href="../modules/agpsHxxt.html">agpsHxxt</a></li>
  <li><a href="../modules/agpsZkw.html">agpsZkw</a></li>
  <li><a href="../modules/audio.html">audio</a></li>
  <li><a href="../modules/cc.html">cc</a></li>
  <li><a href="../modules/clib.html">clib</a></li>
  <li><a href="../modules/common.html">common</a></li>
  <li><a href="../modules/console.html">console</a></li>
  <li><a href="../modules/errDump.html">errDump</a></li>
  <li><a href="../modules/ftp.html">ftp</a></li>
  <li><a href="../modules/gps.html">gps</a></li>
  <li><a href="../modules/gpsHxxt.html">gpsHxxt</a></li>
  <li><a href="../modules/gpsZkw.html">gpsZkw</a></li>
  <li><a href="../modules/http.html">http</a></li>
  <li><a href="../modules/lbsLoc.html">lbsLoc</a></li>
  <li><a href="../modules/led.html">led</a></li>
  <li><a href="../modules/link.html">link</a></li>
  <li><a href="../modules/log.html">log</a></li>
  <li><a href="../modules/misc.html">misc</a></li>
  <li><a href="../modules/mqtt.html">mqtt</a></li>
  <li><a href="../modules/net.html">net</a></li>
  <li><a href="../modules/netLed.html">netLed</a></li>
  <li><a href="../modules/ntp.html">ntp</a></li>
  <li><a href="../modules/nvm.html">nvm</a></li>
  <li><a href="../modules/patch.html">patch</a></li>
  <li><a href="../modules/pb.html">pb</a></li>
  <li><a href="../modules/pins.html">pins</a></li>
  <li><a href="../modules/pm.html">pm</a></li>
  <li><a href="../modules/powerKey.html">powerKey</a></li>
  <li><a href="../modules/record.html">record</a></li>
  <li><strong>ril</strong></li>
  <li><a href="../modules/scanCode.html">scanCode</a></li>
  <li><a href="../modules/sim.html">sim</a></li>
  <li><a href="../modules/sms.html">sms</a></li>
  <li><a href="../modules/socket.html">socket</a></li>
  <li><a href="../modules/sys.html">sys</a></li>
  <li><a href="../modules/uiWin.html">uiWin</a></li>
  <li><a href="../modules/update.html">update</a></li>
  <li><a href="../modules/utils.html">utils</a></li>
  <li><a href="../modules/websocket.html">websocket</a></li>
  <li><a href="../modules/wifiScan.html">wifiScan</a></li>
</ul>

</div>

<div id="content">

<h1>Module <code>ril</code></h1>
<p>模块功能：虚拟串口AT命令交互管理</p>
<p></p>
    <h3>Info:</h3>
    <ul>
        <li><strong>Copyright</strong>: openLuat</li>
        <li><strong>Release</strong>: 2017.02.13</li>
        <li><strong>License</strong>: MIT</li>
        <li><strong>Author</strong>: openLuat</li>
    </ul>


<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
	<tr>
	<td class="name" nowrap><a href="#regRsp">
    regRsp (head, fnc, typ, formt)
    </a></td>
	<td class="summary">注册某个AT命令应答的处理函数</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#regUrc">
    regUrc (prefix, handler)
    </a></td>
	<td class="summary">注册某个urc的处理函数</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#deRegUrc">
    deRegUrc (prefix)
    </a></td>
	<td class="summary">解注册某个urc的处理函数</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#request">
    request (cmd, arg, onrsp, delay)
    </a></td>
	<td class="summary">发送AT命令到底层软件</td>
	</tr>
</table>

<br/>
<br/>


    <h2 class="section-header "><a name="Functions"></a>Functions</h2>

    <dl class="function">
    <dt>
    <a name = "regRsp"></a>
    <strong  style="color: red;">
    regRsp (head, fnc, typ, formt)
    </strong>
    </dt>
    <dd>
    <pre class="example"  style="color: red;">注册某个AT命令应答的处理函数</pre>


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">head</span>
        <pre class="example">  此应答对应的AT命令头，去掉了最前面的AT两个字符</pre>
        </li>
        <li><span class="parameter">fnc</span>
        <pre class="example">   AT命令应答的处理函数</pre>
        </li>
        <li><span class="parameter">typ</span>
        <pre class="example">   AT命令的应答类型，取值范围NORESULT,NUMBERIC,SLINE,MLINE,STRING,SPECIAL</pre>
        </li>
        <li><span class="parameter">formt</span>
        <pre class="example"> typ为STRING时，进一步定义STRING中的详细格式</pre>
        </li>
    </ul>

    <h3>Returns:</h3>
    <ul>
        <li>
        <pre class="example">bool ,成功返回true，失败false</pre></il>
    </ul>



    <h3>Usage:</h3>
    <ul>
        <li><pre class="example">ril.regRsp(<span class="string">"+CSQ"</span>, rsp)</pre></il>
    </ul>

</dd>
    <dt>
    <a name = "regUrc"></a>
    <strong  style="color: red;">
    regUrc (prefix, handler)
    </strong>
    </dt>
    <dd>
    <pre class="example"  style="color: red;">注册某个urc的处理函数</pre>


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">prefix</span>
        <pre class="example">    urc前缀，最前面的连续字符串，包含+、大写字符、数字的组合</pre>
        </li>
        <li><span class="parameter">handler</span>
        <pre class="example">   urc的处理函数</pre>
        </li>
    </ul>

    <h3>Returns:</h3>
    <ul>
        <li>
        <pre class="example">无</pre></il>
    </ul>



    <h3>Usage:</h3>
    <ul>
        <li><pre class="example">ril.regUrc(<span class="string">"+CREG"</span>, neturc)</pre></il>
    </ul>

</dd>
    <dt>
    <a name = "deRegUrc"></a>
    <strong  style="color: red;">
    deRegUrc (prefix)
    </strong>
    </dt>
    <dd>
    <pre class="example"  style="color: red;">解注册某个urc的处理函数</pre>


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">prefix</span>
        <pre class="example">    urc前缀，最前面的连续字符串，包含+、大写字符、数字的组合</pre>
        </li>
    </ul>

    <h3>Returns:</h3>
    <ul>
        <li>
        <pre class="example">无</pre></il>
    </ul>



    <h3>Usage:</h3>
    <ul>
        <li><pre class="example">deRegUrc(<span class="string">"+CREG"</span>)</pre></il>
    </ul>

</dd>
    <dt>
    <a name = "request"></a>
    <strong  style="color: red;">
    request (cmd, arg, onrsp, delay)
    </strong>
    </dt>
    <dd>
    <pre class="example"  style="color: red;">发送AT命令到底层软件</pre>


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">cmd</span>
        <pre class="example">   AT命令内容</pre>
        </li>
        <li><span class="parameter">arg</span>
        <pre class="example">   AT命令参数，例如AT+CMGS=12命令执行后，接下来会发送此参数；AT+CIPSEND=14命令执行后，接下来会发送此参数</pre>
        </li>
        <li><span class="parameter">onrsp</span>
        <pre class="example"> AT命令应答的处理函数，只是当前发送的AT命令应答有效，处理之后就失效了</pre>
        </li>
        <li><span class="parameter">delay</span>
        <pre class="example"> 延时delay毫秒后，才发送此AT命令</pre>
        </li>
    </ul>

    <h3>Returns:</h3>
    <ul>
        <li>
        <pre class="example">无</pre></il>
    </ul>



    <h3>Usage:</h3>
    <ul>
        <li><pre class="example">ril.request(<span class="string">"AT+CENG=1,1"</span>)</pre></il>
        <li><pre class="example">ril.request(<span class="string">"AT+CRSM=214,28539,0,0,12,\"64f01064f03064f002fffff\""</span>, <span class="keyword">nil</span>, crsmResponse)</pre></il>
    </ul>

</dd>
</dl>


</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-08-02 13:53:19 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

